<?php
/**
 * 微信支付通知地址
 *
 *
 * @copyright  Copyright (c) 2007-2015 ShopNC Inc. (http://www.shopnc.net)
 * @license    http://www.shopnc.net
 * @link       http://www.shopnc.net
 * @since      File available since Release v1.1
 */
$_GET['act'] = 'payment';
$_GET['op'] = 'notify';
$_GET['payment_code'] = 'wxpay_jsapi';
//$str = 'message';
//file_put_contents(__DIR__ . '/../../../../data/log/wxpay_jsapi/test.log',$str);exit;

require __DIR__ . '/../../../index.php';

//$d = xmlToArray(file_get_contents('php://input'));
//foreach($d as $k=>$v){
//    $var .=$k.'='.$v ."\r\n";
//}
//file_put_contents(__DIR__ . '/test2.log',$var);
//
//function arrayToXml(array $data)
//{
//    $xml = "<xml>";
//    foreach ($data as $k => $v) {
//        if (is_numeric($v)) {
//            $xml .= "<{$k}>{$v}</{$k}>";
//        } else {
//            $xml .= "<{$k}><![CDATA[{$v}]]></{$k}>";
//        }
//    }
//    $xml .= "</xml>";
//    return $xml;
//}
//
//function xmlToArray($xml)
//{
//    return json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)), true);
//}